
**************************************************************************
** Replication file for: Ethnic Diversity, Anti-Immigrant Sentiments,	**
** and Radical Right Voting in the Flemish Region of Belgium			**
**																		**
** Journal: Swiss Political Science Review								**
**																		**
** Authors: Dieter Stiers & Marc Hooghe									**
**																		**
** Contact: dieter.stiers@kuleuven.be									**
**************************************************************************


*******************************
**ANALYSES MUNICIPALITY LEVEL**
*******************************

***Load data
use "Aggregate_data.dta" , clear


***Summary statistics (Table 1)
sum Votes_VB Proportion_immigrants Proportion_immigrants_change Proportion_unemployed Mean_income Population_density Distance_to_Brussels


***Models (Table 3)
regress Votes_VB Proportion_immigrants
regress Votes_VB Proportion_immigrants Proportion_unemployed Mean_income Population_density Distance_to_Brussels



*****************************
**ANALYSES INDIVIDUAL LEVEL**
*****************************

***Load data
use "Individual_data.dta" , clear


***Summary statistics (Table 1)
sum Vote_VB Proportion_immigrants Sex Age Education Income Employment Attitude_immigrants Proportion_unemployed Mean_income Distance_to_Brussels


***Explaining anti-immigrant sentiments (Table 2)
preserve
	//Create estimation sample
	regress Attitude_immigrants i.Sex Age i.Education Income i.Employment Proportion_immigrants Proportion_unemployed Mean_income Distance_to_Brussels , cluster(Postal_code)
	keep if e(sample)
//Base model (Model 1)
mixed Attitude_immigrants Proportion_immigrants || Postal_code:
//Including individual-level controls (Model 2)
mixed Attitude_immigrants Proportion_immigrants i.Sex Age i.Education Income i.Employment || Postal_code:
//Including aggregate-level controls (Model 3)
mixed Attitude_immigrants Proportion_immigrants i.Sex Age i.Education Income i.Employment Proportion_unemployed Mean_income Distance_to_Brussels || Postal_code:
//Only "Belgian born" (Model 4)
mixed Attitude_immigrants Proportion_immigrants i.Sex Age i.Education Income i.Employment Proportion_unemployed Mean_income Distance_to_Brussels if Born_Belgian==1 || Postal_code:
restore


***Explaining radical-right voting (Table 4)
preserve
	//Create estimation sample
	regress Vote_VB Attitude_immigrants i.Sex Age i.Education Income i.Employment Proportion_immigrants Proportion_unemployed Mean_income Distance_to_Brussels , cluster(Postal_code)
	keep if e(sample)
//Base model (Model 1) 
melogit Vote_VB Proportion_immigrants || Postal_code:
//Including inividual-level controls (Model 2)
melogit Vote_VB Proportion_immigrants i.Sex Age i.Education Income i.Employment || Postal_code:
//Including aggregate-level controls (Model 3)
melogit Vote_VB Proportion_immigrants i.Sex Age i.Education Income i.Employment Proportion_unemployed Mean_income Distance_to_Brussels || Postal_code:
//Including anti-immigrant sentiments (Model 4)
melogit Vote_VB Proportion_immigrants i.Sex Age i.Education Income i.Employment Attitude_immigrants Proportion_unemployed Mean_income Distance_to_Brussels || Postal_code:
//Only "Belgian born" (Model 5)
melogit Vote_VB Proportion_immigrants i.Sex Age i.Education Income i.Employment Attitude_immigrants Proportion_unemployed Mean_income Distance_to_Brussels if Born_Belgian==1 || Postal_code:
restore


**************
**Appendices**
**************
	
***Appendix C: Results using factor scores to measure anti-immigrant attitudes
*Anti-immigrant sentiments (Table C.1)
preserve
	//Create estimation sample
	regress Attitude_immigrants_factor i.Sex Age i.Education Income i.Employment Proportion_immigrants Proportion_unemployed Mean_income Distance_to_Brussels , cluster(Postal_code)
	keep if e(sample)
//Base model (Model 1)
mixed Attitude_immigrants_factor Proportion_immigrants || Postal_code:
//Including individual-level controls (Model 2)
mixed Attitude_immigrants_factor Proportion_immigrants i.Sex Age i.Education Income i.Employment || Postal_code:
//Including aggregate-level controls (Model 3)
mixed Attitude_immigrants_factor Proportion_immigrants i.Sex Age i.Education Income i.Employment Proportion_unemployed Mean_income Distance_to_Brussels || Postal_code:
//Only "Belgian born" (Model 4)
mixed Attitude_immigrants_factor Proportion_immigrants i.Sex Age i.Education Income i.Employment Proportion_unemployed Mean_income Distance_to_Brussels if Born_Belgian==1 || Postal_code:
restore

*Radical-right voting (Table C.2)
preserve
	//Create estimation sample
	regress Vote_VB Attitude_immigrants_factor i.Sex Age i.Education Income i.Employment Proportion_immigrants Proportion_unemployed Mean_income Distance_to_Brussels , cluster(Postal_code)
	keep if e(sample)
//Base model (Model 1)
melogit Vote_VB Proportion_immigrants || Postal_code:
//Including inividual-level controls (Model 2)
melogit Vote_VB Proportion_immigrants i.Sex Age i.Education Income i.Employment || Postal_code:
//Including aggregate-level controls (Model 3)
melogit Vote_VB Proportion_immigrants i.Sex Age i.Education Income i.Employment Proportion_unemployed Mean_income Distance_to_Brussels || Postal_code:
//Including anti-immigrant sentiments (Model 4)
melogit Vote_VB Proportion_immigrants i.Sex Age i.Education Income i.Employment Attitude_immigrants_factor Proportion_unemployed Mean_income Distance_to_Brussels || Postal_code:
//Only "Belgian born" (Model 5)
melogit Vote_VB Proportion_immigrants i.Sex Age i.Education Income i.Employment Attitude_immigrants_factor Proportion_unemployed Mean_income Distance_to_Brussels if Born_Belgian==1 || Postal_code:
restore


***Appendix D: Results using all immigrants (i.e., not only non-EU inhabitants)
*Aggregate-level analyses (Table D.1)
//Load data
preserve 
use "Aggregate_data.dta" , clear
//Estimate models
regress Votes_VB Proportion_immigrants_all
regress Votes_VB Proportion_immigrants_all Proportion_unemployed Mean_income Population_density Distance_to_Brussels
restore

*Anti-immigrant sentiments (Table D.2)
preserve
	//Create estimation sample
	regress Attitude_immigrants i.Sex Age i.Education Income i.Employment Proportion_immigrants_all Proportion_unemployed Mean_income Distance_to_Brussels , cluster(Postal_code)
	keep if e(sample)
//Base model (Model 1)
mixed Attitude_immigrants Proportion_immigrants_all || Postal_code:
//Including individual-level controls (Model 2)
mixed Attitude_immigrants Proportion_immigrants_all i.Sex Age i.Education Income i.Employment || Postal_code:
//Including aggregate-level controls (Model 3)
mixed Attitude_immigrants Proportion_immigrants_all i.Sex Age i.Education Income i.Employment Proportion_unemployed Mean_income Distance_to_Brussels || Postal_code:
//Only "Belgian born" (Model 4)
mixed Attitude_immigrants Proportion_immigrants_all i.Sex Age i.Education Income i.Employment Proportion_unemployed Mean_income Distance_to_Brussels if Born_Belgian==1 || Postal_code:
restore

*Radical-right voting (Table D.3)
preserve
	//Create estimation sample
	regress Vote_VB Attitude_immigrants i.Sex Age i.Education Income i.Employment Proportion_immigrants_all Proportion_unemployed Mean_income Distance_to_Brussels , cluster(Postal_code)
	keep if e(sample)
//Base model (Model 1)
melogit Vote_VB Proportion_immigrants_all || Postal_code:
//Including inividual-level controls (Model 2)
melogit Vote_VB Proportion_immigrants_all i.Sex Age i.Education Income i.Employment || Postal_code:
//Including aggregate-level controls (Model 3)
melogit Vote_VB Proportion_immigrants_all i.Sex Age i.Education Income i.Employment Proportion_unemployed Mean_income Distance_to_Brussels || Postal_code:
//Including anti-immigrant sentiments (Model 4)
melogit Vote_VB Proportion_immigrants_all i.Sex Age i.Education Income i.Employment Attitude_immigrants Proportion_unemployed Mean_income Distance_to_Brussels || Postal_code:
//Only "Belgian born" (Model 5)
melogit Vote_VB Proportion_immigrants_all i.Sex Age i.Education Income i.Employment Attitude_immigrants Proportion_unemployed Mean_income Distance_to_Brussels if Born_Belgian==1 || Postal_code:
restore


***Appendix E: Results using a 4-year lag to measure change in immigration
*Aggregate-level analyses (Table E.1)
//Load data
preserve 
use "Aggregate_data.dta" , clear
//Estimate models
regress Votes_VB Proportion_immigrants_change
regress Votes_VB Proportion_immigrants_change Proportion_unemployed Mean_income Population_density Distance_to_Brussels
restore

*Anti-immigrant sentiments (Table E.2)
preserve
	//Create estimation sample
	regress Attitude_immigrants i.Sex Age i.Education Income i.Employment Proportion_immigrants_change Proportion_unemployed Mean_income Distance_to_Brussels , cluster(Postal_code)
	keep if e(sample)
//Base model (Model 1)
mixed Attitude_immigrants Proportion_immigrants_change || Postal_code:
//Including individual-level controls (Model 2)
mixed Attitude_immigrants Proportion_immigrants_change i.Sex Age i.Education Income i.Employment || Postal_code:
//Including aggregate-level controls (Model 3)
mixed Attitude_immigrants Proportion_immigrants_change i.Sex Age i.Education Income i.Employment Proportion_unemployed Mean_income Distance_to_Brussels || Postal_code:
//Only "Belgian born" (Model 4)
mixed Attitude_immigrants Proportion_immigrants_change i.Sex Age i.Education Income i.Employment Proportion_unemployed Mean_income Distance_to_Brussels if Born_Belgian==1 || Postal_code:
restore

*Radical-right voting (Table E.3)
preserve
	//Create estimation sample
	regress Vote_VB Attitude_immigrants i.Sex Age i.Education Income i.Employment Proportion_immigrants_change Proportion_unemployed Mean_income Distance_to_Brussels , cluster(Postal_code)
	keep if e(sample)
//Base model (Model 1)
melogit Vote_VB Proportion_immigrants_change || Postal_code:
//Including inividual-level controls (Model 2)
melogit Vote_VB Proportion_immigrants_change i.Sex Age i.Education Income i.Employment || Postal_code:
//Including aggregate-level controls (Model 3)
melogit Vote_VB Proportion_immigrants_change i.Sex Age i.Education Income i.Employment Proportion_unemployed Mean_income Distance_to_Brussels || Postal_code:
//Including anti-immigrant sentiments (Model 4)
melogit Vote_VB Proportion_immigrants_change i.Sex Age i.Education Income i.Employment Attitude_immigrants Proportion_unemployed Mean_income Distance_to_Brussels || Postal_code:
//Only "Belgian born" (Model 5)
melogit Vote_VB Proportion_immigrants_change i.Sex Age i.Education Income i.Employment Attitude_immigrants Proportion_unemployed Mean_income Distance_to_Brussels if Born_Belgian==1 || Postal_code:
restore


***Appendix F: Results using voting for N-VA
*Aggregate-level analyses (Table F.1)
//Load data
preserve 
use "Aggregate_data.dta" , clear
//Estimate models
regress Votes_NVA Proportion_immigrants
regress Votes_NVA Proportion_immigrants Proportion_unemployed Mean_income Population_density Distance_to_Brussels
restore

*Radical-right voting (Table F.2)
preserve
	//Create estimation sample
	regress Vote_NVA Attitude_immigrants i.Sex Age i.Education Income i.Employment Proportion_immigrants Proportion_unemployed Mean_income Distance_to_Brussels , cluster(Postal_code)
	keep if e(sample)
//Base model (Model 1)
melogit Vote_NVA Proportion_immigrants || Postal_code:
//Including inividual-level controls (Model 2)
melogit Vote_NVA Proportion_immigrants i.Sex Age i.Education Income i.Employment || Postal_code:
//Including aggregate-level controls (Model 3)
melogit Vote_NVA Proportion_immigrants i.Sex Age i.Education Income i.Employment Proportion_unemployed Mean_income Distance_to_Brussels || Postal_code:
//Including anti-immigrant sentiments (Model 4)
melogit Vote_NVA Proportion_immigrants i.Sex Age i.Education Income i.Employment Attitude_immigrants Proportion_unemployed Mean_income Distance_to_Brussels || Postal_code:
//Only "Belgian born" (Model 5)
melogit Vote_NVA Proportion_immigrants i.Sex Age i.Education Income i.Employment Attitude_immigrants Proportion_unemployed Mean_income Distance_to_Brussels if Born_Belgian==1 || Postal_code:
restore


***Appendix G: Results using a 4-year lag to measure change in immigration
*Aggregate-level analyses (Table G.1)
//Load data
preserve 
use "Aggregate_data.dta" , clear
//Estimate models
regress Votes_VB Proportion_immigrants_change_10
regress Votes_VB Proportion_immigrants_change_10 Proportion_unemployed Mean_income Population_density Distance_to_Brussels
restore

*Anti-immigrant sentiments (Table G.2)
preserve
	//Create estimation sample
	regress Attitude_immigrants i.Sex Age i.Education Income i.Employment Proportion_immigrants_change_10 Proportion_unemployed Mean_income Distance_to_Brussels , cluster(Postal_code)
	keep if e(sample)
//Base model (Model 1)
mixed Attitude_immigrants Proportion_immigrants_change_10 || Postal_code:
//Including individual-level controls (Model 2)
mixed Attitude_immigrants Proportion_immigrants_change_10 i.Sex Age i.Education Income i.Employment || Postal_code:
//Including aggregate-level controls (Model 3)
mixed Attitude_immigrants Proportion_immigrants_change_10 i.Sex Age i.Education Income i.Employment Proportion_unemployed Mean_income Distance_to_Brussels || Postal_code:
//Only "Belgian born" (Model 4)
mixed Attitude_immigrants Proportion_immigrants_change_10 i.Sex Age i.Education Income i.Employment Proportion_unemployed Mean_income Distance_to_Brussels if Born_Belgian==1 || Postal_code:
restore

*Radical-right voting (Table G.3)
preserve
	//Create estimation sample
	regress Vote_VB Attitude_immigrants i.Sex Age i.Education Income i.Employment Proportion_immigrants_change Proportion_unemployed Mean_income Distance_to_Brussels , cluster(Postal_code)
	keep if e(sample)
//Base model (Model 1)
melogit Vote_VB Proportion_immigrants_change_10 || Postal_code:
//Including inividual-level controls (Model 2)
melogit Vote_VB Proportion_immigrants_change_10 i.Sex Age i.Education Income i.Employment || Postal_code:
//Including aggregate-level controls (Model 3)
melogit Vote_VB Proportion_immigrants_change_10 i.Sex Age i.Education Income i.Employment Proportion_unemployed Mean_income Distance_to_Brussels || Postal_code:
//Including anti-immigrant sentiments (Model 4)
melogit Vote_VB Proportion_immigrants_change_10 i.Sex Age i.Education Income i.Employment Attitude_immigrants Proportion_unemployed Mean_income Distance_to_Brussels || Postal_code:
//Only "Belgian born" (Model 5)
melogit Vote_VB Proportion_immigrants_change_10 i.Sex Age i.Education Income i.Employment Attitude_immigrants Proportion_unemployed Mean_income Distance_to_Brussels if Born_Belgian==1 || Postal_code:
restore


***Appendix H: Vote choice models of the French-speaking region of Belgium
*Load data
preserve
use "Data_Wallonia.dta" , clear
*Model (Table H.1)
mlogit Vote Attitude_immigrants i.Sex Age i.Education Income i.Employment
*Create figure H.1
margins, at(Attitude_immigrants=(1(0.1)5)) pr(out(1))
marginsplot,scheme(lean1) xtitle(" ") ytitle("Probability vote") title("Greens") recast(line)	///
recastci(rline) ciopts(lpattern(shortdash) fcolor(white)) name(f1,replace) nodraw
margins, at(Attitude_immigrants=(1(0.1)5)) pr(out(2))
marginsplot,scheme(lean1) xtitle(" ") ytitle(" ") title("Christian-Democrats") recast(line)	///
recastci(rline) ciopts(lpattern(shortdash) fcolor(white)) name(f2,replace) nodraw
margins, at(Attitude_immigrants=(1(0.1)5)) pr(out(3))
marginsplot,scheme(lean1) xtitle(" ") ytitle(" ") title("Liberals") recast(line)	///
recastci(rline) ciopts(lpattern(shortdash) fcolor(white)) name(f3,replace) nodraw
margins, at(Attitude_immigrants=(1(0.1)5)) pr(out(5))
marginsplot,scheme(lean1) xtitle("Anti-immigrant sentiments") ytitle("Probability vote") title("DéFi") recast(line)	///
recastci(rline) ciopts(lpattern(shortdash) fcolor(white)) name(f5,replace) nodraw
margins, at(Attitude_immigrants=(1(0.1)5)) pr(out(6))
marginsplot,scheme(lean1) xtitle("Anti-immigrant sentiments") ytitle(" ") title("Communists") recast(line)	///
recastci(rline) ciopts(lpattern(shortdash) fcolor(white)) name(f6,replace) nodraw
margins, at(Attitude_immigrants=(1(0.1)5)) pr(out(7))
marginsplot,scheme(lean1) xtitle("Anti-immigrant sentiments") ytitle(" ") title("Socialists") recast(line)	///
recastci(rline) ciopts(lpattern(shortdash) fcolor(white)) name(f7,replace) nodraw
graph combine f1 f2 f3 f5 f6 f7 , scheme(lean1) ycommon
restore


***Appendix J: Results including interactions (Table J.1)
preserve
	//Create estimation sample
	regress Vote_VB Attitude_immigrants i.Sex Age i.Education Income i.Employment Proportion_immigrants Proportion_unemployed Mean_income Distance_to_Brussels , cluster(Postal_code)
keep if e(sample)
//Base model (Model 1)
melogit Vote_VB Proportion_immigrants || Postal_code:
//Interaction educational level (Model 2)
melogit Vote_VB i.Sex Age Income i.Employment i.Education##c.Proportion_immigrants Proportion_unemployed Mean_income Distance_to_Brussels || Postal_code:
//Interaction anti-immigrant sentiments (Model 3)
melogit Vote_VB i.Sex Age Income i.Employment i.Education c.Attitude_immigrants##c.Proportion_immigrants Proportion_unemployed Mean_income Distance_to_Brussels || Postal_code:
restore


***Appendix K: Distance effects using regional centres
*Anti-immigrant sentiments (Table K.1)
preserve
	//Create estimation sample
	regress Attitude_immigrants i.Sex Age i.Education Income i.Employment Proportion_immigrants Proportion_unemployed Mean_income Distance_to_regcentre , cluster(Postal_code)
	keep if e(sample)
//Including aggregate-level controls (Model 3)
mixed Attitude_immigrants Proportion_immigrants i.Sex Age i.Education Income i.Employment Proportion_unemployed Mean_income Distance_to_regcentre || Postal_code:
//Only "Belgian born" (Model 4)
mixed Attitude_immigrants Proportion_immigrants i.Sex Age i.Education Income i.Employment Proportion_unemployed Mean_income Distance_to_regcentre if Born_Belgian==1 || Postal_code:
restore

*Radical-right voting (Table K.2)
preserve
	//Create estimation sample
	regress Vote_VB Attitude_immigrants i.Sex Age i.Education Income i.Employment Proportion_immigrants Proportion_unemployed Mean_income Distance_to_regcentre , cluster(Postal_code)
	keep if e(sample)
//Including aggregate-level controls (Model 3)
melogit Vote_VB Proportion_immigrants i.Sex Age i.Education Income i.Employment Proportion_unemployed Mean_income Distance_to_regcentre || Postal_code:
//Including anti-immigrant sentiments (Model 4)
melogit Vote_VB Proportion_immigrants i.Sex Age i.Education Income i.Employment Attitude_immigrants Proportion_unemployed Mean_income Distance_to_regcentre || Postal_code:
//Only "Belgian born" (Model 5)
melogit Vote_VB Proportion_immigrants i.Sex Age i.Education Income i.Employment Attitude_immigrants Proportion_unemployed Mean_income Distance_to_regcentre if Born_Belgian==1 || Postal_code:
restore